home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
FM Towns: Free Software Collection 4
/
FM Towns Free Software Collection 4 - Disc 1.iso
/
data
/
fmgraph
/
g_box.c
< prev
next >
Wrap
Text File
|
1991-10-18
|
652b
|
37 lines
#include <stdio.h>
#include <dos.h>
struct BOX {
unsigned type;
int bx1,by1,bx2,by2;
};
extern unsigned char gds_fshift;
extern unsigned gds_wrkoff;
extern unsigned gds_wrkseg;
int g_box(int x1,int y1,int x2,int y2)
{
union REGS reg;
struct SREGS seg;
struct {
unsigned len;
struct BOX box;
} gdata;
segread(&seg);
reg.h.ah=gds_fshift+0x0f;
reg.x.di=(unsigned)&gdata;
seg.ds=seg.ss;
gdata.len=10;
gdata.box.type=0x4168;
gdata.box.bx1=x1;
gdata.box.by1=y1;
gdata.box.bx2=x2;
gdata.box.by2=y2;
reg.x.bx=gds_wrkoff;
seg.es=gds_wrkseg;
int86x(0x92,®,®,&seg);
return (int)reg.h.ah;
}